package com.proton.carepatchtemp.database;

import com.proton.carepatchtemp.database.dao.EcgDeviceInfo;
import com.proton.carepatchtemp.utils.SpUtils;


/**
 * Created by Api on 2016/10/19.
 */

public class SpEcgDevice {

    public final static String ECG_DEVICE_INFO = "ecg_device_info";
    public static EcgDeviceInfo mEcgDeviceInfo = null;

    public static EcgDeviceInfo getmEcgDeviceInfo() {
        if (null == mEcgDeviceInfo) {
            mEcgDeviceInfo = (EcgDeviceInfo) SpUtils.getObj(ECG_DEVICE_INFO);
        }
        if (null == mEcgDeviceInfo) {
            return new EcgDeviceInfo();
        }
        return mEcgDeviceInfo;
    }

    public static void setmEcgDeviceInfo(EcgDeviceInfo mEcgDeviceInfo) {
        SpEcgDevice.mEcgDeviceInfo = mEcgDeviceInfo;
        SpUtils.saveObj(ECG_DEVICE_INFO, mEcgDeviceInfo);
    }


}
